<?php
function getCategorySiteAreas() {
	global $dbname, $db, $db_selected;
	
	$sql = "SELECT DISTINCT(SiteArea) AS SiteArea from cdc_sysCategory 
			WHERE Editable = 1 ORDER BY SiteArea";
	$result = mysql_db_query($dbname,$sql);
	
	$stringJSON   = '({"CategorySiteAreas":[';
	while ($value = mysql_fetch_assoc($result)) {
		$stringJSON .= Zend_Json::encode($value).',';		
	}	
	$stringJSON = substr($stringJSON,0,-1);
	$stringJSON .= ']})';
	
	return $stringJSON;
}
?>